home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_05
/
plauger
/
findarr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-08
|
518b
|
21 lines
-------------- Listing 13: The function ios::_Findarr(int) ----------
// iosarray -- ios::_Findarr(int)
#include <ios>
ios::_Iosarray& ios::_Findarr(int idx)
{ // locate or make a variable array element
_Iosarray *p;
if (idx < 0)
failure("ios::failure", "ios::iword or pword",
"index < 0").raise();
for (p = _Arr; p != 0; p = p->_Next)
if (p->_Index == idx)
return (*p);
_Arr = new _Iosarray(idx, _Arr);
return (*_Arr);
}